Integrand size = 26, antiderivative size = 200 \[ \int \frac {(A+B x) \sqrt {b x+c x^2}}{d+e x} \, dx=-\frac {(4 B c d-b B e-4 A c e-2 B c e x) \sqrt {b x+c x^2}}{4 c e^2}-\frac {\left (4 A c e (2 c d-b e)-B \left (8 c^2 d^2-4 b c d e-b^2 e^2\right )\right ) \text {arctanh}\left (\frac {\sqrt {c} x}{\sqrt {b x+c x^2}}\right )}{4 c^{3/2} e^3}-\frac {\sqrt {d} (B d-A e) \sqrt {c d-b e} \text {arctanh}\left (\frac {b d+(2 c d-b e) x}{2 \sqrt {d} \sqrt {c d-b e} \sqrt {b x+c x^2}}\right )}{e^3} \]
[Out]
Time = 0.17 (sec) , antiderivative size = 200, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.192, Rules used = {828, 857, 634, 212, 738} \[ \int \frac {(A+B x) \sqrt {b x+c x^2}}{d+e x} \, dx=-\frac {\text {arctanh}\left (\frac {\sqrt {c} x}{\sqrt {b x+c x^2}}\right ) \left (4 A c e (2 c d-b e)-B \left (-b^2 e^2-4 b c d e+8 c^2 d^2\right )\right )}{4 c^{3/2} e^3}-\frac {\sqrt {d} (B d-A e) \sqrt {c d-b e} \text {arctanh}\left (\frac {x (2 c d-b e)+b d}{2 \sqrt {d} \sqrt {b x+c x^2} \sqrt {c d-b e}}\right )}{e^3}-\frac {\sqrt {b x+c x^2} (-4 A c e-b B e+4 B c d-2 B c e x)}{4 c e^2} \]
[In]
[Out]
Rule 212
Rule 634
Rule 738
Rule 828
Rule 857
Rubi steps \begin{align*} \text {integral}& = -\frac {(4 B c d-b B e-4 A c e-2 B c e x) \sqrt {b x+c x^2}}{4 c e^2}-\frac {\int \frac {-\frac {1}{2} b d (4 B c d-b B e-4 A c e)+\frac {1}{2} \left (4 A c e (2 c d-b e)-B \left (8 c^2 d^2-4 b c d e-b^2 e^2\right )\right ) x}{(d+e x) \sqrt {b x+c x^2}} \, dx}{4 c e^2} \\ & = -\frac {(4 B c d-b B e-4 A c e-2 B c e x) \sqrt {b x+c x^2}}{4 c e^2}-\frac {(d (B d-A e) (c d-b e)) \int \frac {1}{(d+e x) \sqrt {b x+c x^2}} \, dx}{e^3}-\frac {\left (4 A c e (2 c d-b e)-B \left (8 c^2 d^2-4 b c d e-b^2 e^2\right )\right ) \int \frac {1}{\sqrt {b x+c x^2}} \, dx}{8 c e^3} \\ & = -\frac {(4 B c d-b B e-4 A c e-2 B c e x) \sqrt {b x+c x^2}}{4 c e^2}+\frac {(2 d (B d-A e) (c d-b e)) \text {Subst}\left (\int \frac {1}{4 c d^2-4 b d e-x^2} \, dx,x,\frac {-b d-(2 c d-b e) x}{\sqrt {b x+c x^2}}\right )}{e^3}-\frac {\left (4 A c e (2 c d-b e)-B \left (8 c^2 d^2-4 b c d e-b^2 e^2\right )\right ) \text {Subst}\left (\int \frac {1}{1-c x^2} \, dx,x,\frac {x}{\sqrt {b x+c x^2}}\right )}{4 c e^3} \\ & = -\frac {(4 B c d-b B e-4 A c e-2 B c e x) \sqrt {b x+c x^2}}{4 c e^2}-\frac {\left (4 A c e (2 c d-b e)-B \left (8 c^2 d^2-4 b c d e-b^2 e^2\right )\right ) \tanh ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {b x+c x^2}}\right )}{4 c^{3/2} e^3}-\frac {\sqrt {d} (B d-A e) \sqrt {c d-b e} \tanh ^{-1}\left (\frac {b d+(2 c d-b e) x}{2 \sqrt {d} \sqrt {c d-b e} \sqrt {b x+c x^2}}\right )}{e^3} \\ \end{align*}
Result contains complex when optimal does not.
Time = 2.41 (sec) , antiderivative size = 483, normalized size of antiderivative = 2.42 \[ \int \frac {(A+B x) \sqrt {b x+c x^2}}{d+e x} \, dx=\frac {\sqrt {x} \sqrt {b+c x} \left (\sqrt {c} \sqrt {d} e \sqrt {x} \sqrt {b+c x} (4 A c e+B (-4 c d+b e+2 c e x))+8 \sqrt {c} (B d-A e) \left (c d-b e-i \sqrt {b} \sqrt {e} \sqrt {c d-b e}\right ) \sqrt {-c d+2 b e-2 i \sqrt {b} \sqrt {e} \sqrt {c d-b e}} \arctan \left (\frac {\sqrt {-c d+2 b e-2 i \sqrt {b} \sqrt {e} \sqrt {c d-b e}} \sqrt {x}}{\sqrt {d} \left (-\sqrt {b}+\sqrt {b+c x}\right )}\right )+8 \sqrt {c} (B d-A e) \left (c d-b e+i \sqrt {b} \sqrt {e} \sqrt {c d-b e}\right ) \sqrt {-c d+2 b e+2 i \sqrt {b} \sqrt {e} \sqrt {c d-b e}} \arctan \left (\frac {\sqrt {-c d+2 b e+2 i \sqrt {b} \sqrt {e} \sqrt {c d-b e}} \sqrt {x}}{\sqrt {d} \left (-\sqrt {b}+\sqrt {b+c x}\right )}\right )+2 \sqrt {d} \left (4 A c e (-2 c d+b e)+B \left (8 c^2 d^2-4 b c d e-b^2 e^2\right )\right ) \text {arctanh}\left (\frac {\sqrt {c} \sqrt {x}}{-\sqrt {b}+\sqrt {b+c x}}\right )\right )}{4 c^{3/2} \sqrt {d} e^3 \sqrt {x (b+c x)}} \]
[In]
[Out]
Time = 1.12 (sec) , antiderivative size = 165, normalized size of antiderivative = 0.82
method | result | size |
pseudoelliptic | \(-\frac {-\frac {2 \left (b e -c d \right ) \left (A e -B d \right ) d \arctan \left (\frac {\sqrt {x \left (c x +b \right )}\, d}{x \sqrt {d \left (b e -c d \right )}}\right )}{\sqrt {d \left (b e -c d \right )}}-\frac {e \sqrt {x \left (c x +b \right )}\, \left (2 B c e x +4 A c e +B b e -4 B c d \right )}{4 c}-\frac {\left (4 A b c \,e^{2}-8 A \,c^{2} d e -B \,b^{2} e^{2}-4 B b c d e +8 B \,c^{2} d^{2}\right ) \operatorname {arctanh}\left (\frac {\sqrt {x \left (c x +b \right )}}{x \sqrt {c}}\right )}{4 c^{\frac {3}{2}}}}{e^{3}}\) | \(165\) |
risch | \(\frac {\left (2 B c e x +4 A c e +B b e -4 B c d \right ) x \left (c x +b \right )}{4 c \,e^{2} \sqrt {x \left (c x +b \right )}}+\frac {\frac {\left (4 A b c \,e^{2}-8 A \,c^{2} d e -B \,b^{2} e^{2}-4 B b c d e +8 B \,c^{2} d^{2}\right ) \ln \left (\frac {\frac {b}{2}+c x}{\sqrt {c}}+\sqrt {c \,x^{2}+b x}\right )}{e \sqrt {c}}+\frac {8 d \left (A b \,e^{2}-A c d e -B b d e +B c \,d^{2}\right ) c \ln \left (\frac {-\frac {2 d \left (b e -c d \right )}{e^{2}}+\frac {\left (b e -2 c d \right ) \left (x +\frac {d}{e}\right )}{e}+2 \sqrt {-\frac {d \left (b e -c d \right )}{e^{2}}}\, \sqrt {\left (x +\frac {d}{e}\right )^{2} c +\frac {\left (b e -2 c d \right ) \left (x +\frac {d}{e}\right )}{e}-\frac {d \left (b e -c d \right )}{e^{2}}}}{x +\frac {d}{e}}\right )}{e^{2} \sqrt {-\frac {d \left (b e -c d \right )}{e^{2}}}}}{8 e^{2} c}\) | \(286\) |
default | \(\frac {B \left (\frac {\left (2 c x +b \right ) \sqrt {c \,x^{2}+b x}}{4 c}-\frac {b^{2} \ln \left (\frac {\frac {b}{2}+c x}{\sqrt {c}}+\sqrt {c \,x^{2}+b x}\right )}{8 c^{\frac {3}{2}}}\right )}{e}+\frac {\left (A e -B d \right ) \left (\sqrt {\left (x +\frac {d}{e}\right )^{2} c +\frac {\left (b e -2 c d \right ) \left (x +\frac {d}{e}\right )}{e}-\frac {d \left (b e -c d \right )}{e^{2}}}+\frac {\left (b e -2 c d \right ) \ln \left (\frac {\frac {b e -2 c d}{2 e}+c \left (x +\frac {d}{e}\right )}{\sqrt {c}}+\sqrt {\left (x +\frac {d}{e}\right )^{2} c +\frac {\left (b e -2 c d \right ) \left (x +\frac {d}{e}\right )}{e}-\frac {d \left (b e -c d \right )}{e^{2}}}\right )}{2 e \sqrt {c}}+\frac {d \left (b e -c d \right ) \ln \left (\frac {-\frac {2 d \left (b e -c d \right )}{e^{2}}+\frac {\left (b e -2 c d \right ) \left (x +\frac {d}{e}\right )}{e}+2 \sqrt {-\frac {d \left (b e -c d \right )}{e^{2}}}\, \sqrt {\left (x +\frac {d}{e}\right )^{2} c +\frac {\left (b e -2 c d \right ) \left (x +\frac {d}{e}\right )}{e}-\frac {d \left (b e -c d \right )}{e^{2}}}}{x +\frac {d}{e}}\right )}{e^{2} \sqrt {-\frac {d \left (b e -c d \right )}{e^{2}}}}\right )}{e^{2}}\) | \(353\) |
[In]
[Out]
none
Time = 0.77 (sec) , antiderivative size = 800, normalized size of antiderivative = 4.00 \[ \int \frac {(A+B x) \sqrt {b x+c x^2}}{d+e x} \, dx=\left [\frac {{\left (8 \, B c^{2} d^{2} - 4 \, {\left (B b c + 2 \, A c^{2}\right )} d e - {\left (B b^{2} - 4 \, A b c\right )} e^{2}\right )} \sqrt {c} \log \left (2 \, c x + b + 2 \, \sqrt {c x^{2} + b x} \sqrt {c}\right ) - 8 \, {\left (B c^{2} d - A c^{2} e\right )} \sqrt {c d^{2} - b d e} \log \left (\frac {b d + {\left (2 \, c d - b e\right )} x + 2 \, \sqrt {c d^{2} - b d e} \sqrt {c x^{2} + b x}}{e x + d}\right ) + 2 \, {\left (2 \, B c^{2} e^{2} x - 4 \, B c^{2} d e + {\left (B b c + 4 \, A c^{2}\right )} e^{2}\right )} \sqrt {c x^{2} + b x}}{8 \, c^{2} e^{3}}, -\frac {16 \, {\left (B c^{2} d - A c^{2} e\right )} \sqrt {-c d^{2} + b d e} \arctan \left (-\frac {\sqrt {-c d^{2} + b d e} \sqrt {c x^{2} + b x}}{{\left (c d - b e\right )} x}\right ) - {\left (8 \, B c^{2} d^{2} - 4 \, {\left (B b c + 2 \, A c^{2}\right )} d e - {\left (B b^{2} - 4 \, A b c\right )} e^{2}\right )} \sqrt {c} \log \left (2 \, c x + b + 2 \, \sqrt {c x^{2} + b x} \sqrt {c}\right ) - 2 \, {\left (2 \, B c^{2} e^{2} x - 4 \, B c^{2} d e + {\left (B b c + 4 \, A c^{2}\right )} e^{2}\right )} \sqrt {c x^{2} + b x}}{8 \, c^{2} e^{3}}, -\frac {{\left (8 \, B c^{2} d^{2} - 4 \, {\left (B b c + 2 \, A c^{2}\right )} d e - {\left (B b^{2} - 4 \, A b c\right )} e^{2}\right )} \sqrt {-c} \arctan \left (\frac {\sqrt {c x^{2} + b x} \sqrt {-c}}{c x}\right ) + 4 \, {\left (B c^{2} d - A c^{2} e\right )} \sqrt {c d^{2} - b d e} \log \left (\frac {b d + {\left (2 \, c d - b e\right )} x + 2 \, \sqrt {c d^{2} - b d e} \sqrt {c x^{2} + b x}}{e x + d}\right ) - {\left (2 \, B c^{2} e^{2} x - 4 \, B c^{2} d e + {\left (B b c + 4 \, A c^{2}\right )} e^{2}\right )} \sqrt {c x^{2} + b x}}{4 \, c^{2} e^{3}}, -\frac {8 \, {\left (B c^{2} d - A c^{2} e\right )} \sqrt {-c d^{2} + b d e} \arctan \left (-\frac {\sqrt {-c d^{2} + b d e} \sqrt {c x^{2} + b x}}{{\left (c d - b e\right )} x}\right ) + {\left (8 \, B c^{2} d^{2} - 4 \, {\left (B b c + 2 \, A c^{2}\right )} d e - {\left (B b^{2} - 4 \, A b c\right )} e^{2}\right )} \sqrt {-c} \arctan \left (\frac {\sqrt {c x^{2} + b x} \sqrt {-c}}{c x}\right ) - {\left (2 \, B c^{2} e^{2} x - 4 \, B c^{2} d e + {\left (B b c + 4 \, A c^{2}\right )} e^{2}\right )} \sqrt {c x^{2} + b x}}{4 \, c^{2} e^{3}}\right ] \]
[In]
[Out]
\[ \int \frac {(A+B x) \sqrt {b x+c x^2}}{d+e x} \, dx=\int \frac {\sqrt {x \left (b + c x\right )} \left (A + B x\right )}{d + e x}\, dx \]
[In]
[Out]
Exception generated. \[ \int \frac {(A+B x) \sqrt {b x+c x^2}}{d+e x} \, dx=\text {Exception raised: ValueError} \]
[In]
[Out]
Exception generated. \[ \int \frac {(A+B x) \sqrt {b x+c x^2}}{d+e x} \, dx=\text {Exception raised: TypeError} \]
[In]
[Out]
Timed out. \[ \int \frac {(A+B x) \sqrt {b x+c x^2}}{d+e x} \, dx=\int \frac {\sqrt {c\,x^2+b\,x}\,\left (A+B\,x\right )}{d+e\,x} \,d x \]
[In]
[Out]